﻿<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<head>
<title>我的预约列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=request.getContextPath()%>/style/adminStyle.css" rel="stylesheet" type="text/css" />
<script src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script src="<%=request.getContextPath()%>/js/public.js"></script>
<script type="text/javascript">

function selt() {
	var i=1;
	var emp=$("#accountNumber").val();
	if(emp==null||emp==""){
		i=0;
	}
	
	if(i==1){
		return true;
	}else{
		alert("条件不能为空"); 
		return false;
	}
}

</script>
</head>
<body>
 <div class="wrap">
  
  <div class="operate">
   <form action="../Administrators/master_me.do">
    <select class="inline-select">
     <option >预约人账号</option>
     
    </select>
    <input type="text" class="textBox length-long" placeholder="输入查询条件..." name="accountNumber" id="accountNumber"/>
    <input type="submit" value="查询" class="tdBtn" onclick="return selt()"/>
   </form>
  </div>
  <table class="list-style Interlaced">
   <tr>
     <th>ID</th>
     <th>预约账号</th>
     <th>预约人姓名</th>
     <th>预约大师</th>
     <th>性别</th>
    
     <th>订单号</th>
     <th>是否支付</th>
     <th>操作</th>
   </tr>
    <c:forEach items="${order}" var="orderlist">
   <tr>
    <td class="center">${orderlist.id}</td>
     <td class="center">${orderlist.accountNumber}</td>
     <td class="center">${orderlist.name}</td>
    <td class="center">${orderlist.surname}</td>
    <td class="center">
     <c:if test="${orderlist.sex==0}">
    	<span>女</span>
	</c:if>
	  <c:if test="${orderlist.sex==1}">
    	<span>男</span>
	</c:if>
    </td>
   
    <td class="center">${orderlist.orderNumber}</td>
    
     <td class="center">
    <c:if test="${orderlist.payment==0}">
    	<span>未支付</span>
	</c:if>
      <c:if test="${orderlist.payment==1}">
    	<span>已支付</span>
	</c:if>
     </td>
    <td class="center">
     <a href="../Administrators/order_detail.do?orderNumber=${orderlist.orderNumber}" class="inline-block" title="查看" onclick="return selec()"><img src="<%=request.getContextPath()%>/images/icon_edit.gif"/></a>
   
    </td>
   </tr>
    </c:forEach>
  </table>
  <!-- BatchOperation -->
  <div style="overflow:hidden;">
      <!-- Operation -->
	 <!--  <div class="BatchOperation fl">
	   <input type="checkbox" id="del"/>
	   <label for="del" class="btnStyle middle">全选</label>
	   <input type="button" value="批量删除" class="btnStyle"/>
	  </div> -->
	  <!-- turn page -->
	  <div class="turnPage center fr">
	   <a href="../Administrators/cont_me.do?cont=${page.allSize-1}" onclick="return checkFirst(${page.allSize-1})">上一页</a>
	   <a>当前：第${page.allSize}页,共${page.totalPage}页</a>
	   <a href="../Administrators/cont_me.do?cont=${page.allSize+1}" onclick="return checkNext(${page.allSize+1})">下一页</a>
	  </div>
  </div>
 </div>
 <script type="text/javascript">
 function checkFirst(id){
	    if(id>=1){
	      return true;
	    }
	    alert("已到页首,无法加载更多");
	 return false;
	}
	var tol=${page.totalPage};
	function checkNext(id){
		  if(id<=tol){
			  return true; 
		  }
	    alert("已到页尾,无法加载更多页");
	    return false;
	    } 
 
 </script>
</body>
</html>